package cate.common.table.activity.exorcism.sheet;


import cate.common.table.ESheet;
import cate.common.table.activity.exorcism.row.ExorcismTaskRow;
import easy.java.dev.note.NoteClass;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

@NoteClass("驱魔之夜-任务")
public class ExorcismTaskSheet extends ESheet<ExorcismTaskRow> {

    @Override
    public String getSheetName() {
        return "任务";
    }


    public List<Integer> getAllTask(int configTid){
       return this.getList().stream().filter(a->a.confitTid==configTid).map(a->a.taksId).collect(Collectors.toList());
    }

    public List<Integer> getDailyTask(int configTid) {
        List<Integer> result = new ArrayList<>();
        for (ExorcismTaskRow row : this.getList()) {
            if (row.confitTid == configTid && row.refreshDaily) {
                result.add(row.taksId);
            }
        }
        return result;
    }


}
